Allow specifying a custom sidecar resource name via DaprSidecarOptions#1265
Allow specifying a custom sidecar resource name via DaprSidecarOptions#1265adrien426 wants to merge 1 commit intoCommunityToolkit:mainfrom
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1265Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1265" |
@dotnet-policy-service agree |
8d73f41 to
b7c38af
Compare
Closes #1264
Currently, when a Dapr sidecar is added, the naming chain is:
{resourceName}-dapr{sidecarName}-cli→ which gives{resourceName}-dapr-cliThis means the CLI name is derived from the sidecar name, not directly from the parent resource.
This PR adds a
SidecarNameproperty toDaprSidecarOptionsso developers can override the sidecar resource name. When set, the CLI resource name also follows (e.g.,my-sidecar→my-sidecar-cli). When null or whitespace, the current defaults are preserved.Refactored the existing
WithDaprSidecaroverloads to delegate to a sharedWithDaprSidecarCoreprivate method. Added a new overload accepting an explicitsidecarNameparameter.PR Checklist
Other information
None.